﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Rarous.Gryphoon.Configuration {
  public class SiteSection : ConfigurationSection {
    private const string NameAttribute = "name";
    private const string UrlAttribute = "url";

    /// <summary>
    /// Vrací nebo nastavuje název webu.
    /// </summary>
    [ConfigurationProperty(NameAttribute, DefaultValue = "Gryphoon weblog", IsRequired = true)]
    public string Name {
      get {
        return this[NameAttribute] as String;
      }
      set {
        this[NameAttribute] = value;
      }
    }


    /// <summary>
    /// Vrací nebo nastavuje URL adresu webu.
    /// </summary>
    [ConfigurationProperty(UrlAttribute, DefaultValue = "", IsRequired = true)]
    public string Url {
      get {
        return this[UrlAttribute] as String;
      }
      set {
        this[UrlAttribute] = value;
      }
    }
  }
}
